import React,{FC, forwardRef,useRef,useImperativeHandle,memo} from 'react'
interface HomeSwipeProps{
  count?:number
  ref:any
}
const HomeSwipe:FC<any> = forwardRef((props, ref) => {
  // 属性
  const inputRef = useRef<HTMLInputElement | null>(null)
  // const inputRef = useRef<HTMLInputElement|null>(null)
//  方法
const handleImageClick=()=>{
  console.log('imageClick')
}
useImperativeHandle(ref,()=>{
return {
  inputRef,
  handleImageClick
}
})
  return (
    <div>
      HomeSwipe
      <input type="text" ref={inputRef}/>
    </div>
  )
})
export default memo(HomeSwipe)

